

package com.hazelcast.internal.monitor;

import com.hazelcast.internal.management.dto.ClientEndPointDTO;
import com.hazelcast.internal.management.dto.ClusterHotRestartStatusDTO;
import com.hazelcast.json.internal.JsonSerializable;

import java.util.Collection;
import java.util.UUID;

/**
 * Local statistics for a Hazelcast member.
 */
public interface MemberState extends JsonSerializable {

    String getAddress();

    /**
     * Returns the UUID of this member.
     *
     * @return the UUID of this member.
     */
    UUID getUuid();

    /**
     * Returns the local CP member's UUID if this Hazelcast
     * member is part of the CP subsystem, returns null otherwise.
     *
     * @return local CP member's UUID if available, null otherwise
     */
    UUID getCpMemberUuid();

    /**
     * Returns the name of a Hazelcast member.
     *
     * @return the name of a Hazelcast member.
     */
    String getName();

    Collection<ClientEndPointDTO> getClients();

    /**
     * Returns the local operation statistics.
     *
     * @return LocalOperationStats statistics
     */
    LocalOperationStats getOperationStats();

    MemberPartitionState getMemberPartitionState();

    NodeState getNodeState();

    HotRestartState getHotRestartState();

    ClusterHotRestartStatusDTO getClusterHotRestartStatus();
}
